package com.kailong.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * created by kailong on 2025/8/4
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class BaseEntity implements Serializable {

    /**
     * 系统ID
     */
    @ExcelProperty(value = "系统ID", index = -1)
    @JSONField(serializeUsing = com.alibaba.fastjson.serializer.ToStringSerializer.class)
    private Long id;

    /**
     * 创建人ID
     */
    @ExcelProperty(value = "创建人ID", index = -2)
    @TableField("create_user_id")
    private Long createUserId;

    /**
     * 创建人名称
     */
    @ExcelProperty(value = "创建人名称", index = -3)
    @TableField("create_user_name")
    private String createUserName;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间", index = -4)
    @TableField("create_time")
    private Date createTime;

    /**
     * 修改人ID
     */
    @ExcelProperty(value = "修改人ID", index = -5)
    @TableField("update_user_id")
    private Long updateUserId;

    /**
     * 修改人名称
     */
    @ExcelProperty(value = "修改人名称", index = -6)
    @TableField("update_user_name")
    private String updateUserName;

    /**
     * 修改时间
     */
    @ExcelProperty(value = "修改时间", index = -7)
    @TableField("update_time")
    private Date updateTime;

    /**
     * 是否删除
     */
    @ExcelProperty(value = "是否删除", index = -8)
    @TableLogic
    @TableField("is_del")
    private Integer isDel;//未删除是0，删除了是1

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

}